package com.dearbinge.data.dao.commodity;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.dearbinge.data.pojo.commodity.CommodityCommissionDO;
import org.mapstruct.Mapper;

/**
 * 商品佣金dao
 *
 * @author wes
 * @date 2019/3/11
 */
@Mapper
public interface CommodityCommissionMapper extends BaseMapper<CommodityCommissionDO> {

    /**
     * 逻辑删除
     * @param commodityCommissionId 主键id
     * @return 结果
     */
    int deleteByPrimaryKey(Integer commodityCommissionId);

    /**
     * 根据id查询
     * @param commodityCommissionId id
     * @return 结果
     */
    CommodityCommissionDO getById(Integer commodityCommissionId);

    /**
     * 根据商品id查询
     * @param commodityId 商品id
     * @return 结果
     */
    CommodityCommissionDO getByCommodityId(Integer commodityId);
}